Method and apparatus for reducing audio noise in a switching regulator

ABSTRACT

A switching regulator utilizing on/off control that reduces audio noise at light loads by adjusting the current limit of the switching regulator. In one embodiment, a switching regulator includes a state machine that adjusts the current limit of the switching regulator based on a pattern of feedback signal values from the output of the power supply for a preceding N cycles of the drive signal. The state machine adjusts the current limit lower at light loads such that cycles are not skipped to reduce the operating frequency of the switching regulator into the audio frequency range until the flux density through the transformer is sufficiently low to reduce the generation of audio noise.

CROSS REFERENCE TO RELATED APPLICATION

This is a continuation of U.S. application Ser. No. 09/634,237, filedAug. 8, 2000, now pending now U.S. Pat. No. 6,525,514.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to power supplies and, morespecifically, the present invention relates to a switching regulator.

2. Background Information

Electronic devices use power to operate. Switched mode power suppliesare commonly used due to their high efficiency and good outputregulation to power many of today's electronic devices. In a knownswitched mode power supply, a low frequency (e.g. 50 or 60 Hz mainsfrequency), high voltage alternating current (AC) is converted to highfrequency (e.g. 30 to 300 kHz) AC, using a switched mode power supplycontrol circuit. This high frequency, high voltage AC is applied to atransformer to transform the voltage, usually to a lower voltage, and toprovide safety isolation. The output of the transformer is rectified toprovide a regulated DC output, which may be used to power an electronicdevice. The switched mode power supply control circuit usually providesoutput regulation by sensing the output and controlling it in a closedloop.

A switched mode power supply may include an integrated circuit switchingregulator, which may include a power switch or transistor coupled inseries with a primary winding of the transformer. Energy is transferredto a secondary winding of the transformer by turning on and off of thepower transistor in a manner controlled by the switching regulator toprovide a clean and steady source of power at the DC output. In a knownswitching regulator, a feedback current is sampled from the output ofthe DC output of the power supply. When the feedback current is below aregulation threshold, the power switch is switched at a constantfrequency. However, when the feedback current is above a regulationthreshold, the switching regulator is disabled, resulting in a skippedcycle of the power switch.

When cycles are skipped by a switching regulator as described above, theresulting frequency of operation of the switching regulator is reduced.Thus, the frequency of operation of the switching regulator is varied ascycles are skipped to regulate the DC output of the power supply, withthe frequency decreasing as the load coupled to the DC output decreases.Generally, when the frequency of operation of known power supplies ofthis type drop to frequencies within the audio frequency range, such aswithin 20 Hz to 20 kHz, undesirable audio noise is generated by thetransformers of the power supplies.

SUMMARY OF THE INVENTION

Switching regulator methods and apparatuses are disclosed. In oneembodiment, a switching regulator includes a power switch coupledbetween first and second terminals. The first terminal is coupled to anenergy transfer element of a power supply and the second terminal to becoupled to a supply rail of the power supply. A drive signal generatorcircuit is coupled to a third terminal to receive a feedback signalrepresentative of an output of the power supply. The drive signalgenerator generates a drive signal coupled to control switching of thepower switch in response to the feedback signal. The drive signalgenerator circuit selectively disables each on period of the drivesignal in response to the feedback signal to regulate the output of thepower supply. A current limit circuit is coupled to the power switch andthe drive signal generator circuit to control the drive signal to limita current flow through the power switch. The current limit circuitincludes a plurality of current limit settings for the power switch thatare selected in response to the feedback signal. Additional features andbenefits of the present invention will become apparent from the detaileddescription, figures and claims set forth below.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention detailed illustrated by way of example and notlimitation in the accompanying figures.

FIG. 1 is a schematic illustrating one embodiment of a power supplyincluding a switching regulator in accordance with the teachings of thepresent invention.

FIG. 2 is a schematic illustrating one embodiment of a switchingregulator in accordance with the teachings of the present invention.

FIG. 3 is a state machine diagram illustrating one embodiment of theprocessing flow between states of a state machine in accordance with theteachings of the present invention.

FIG. 4 is a schematic illustrating one embodiment of state machinecircuitry in accordance with the teachings of the present invention.

FIG. 5 is a schematic illustrating one embodiment of current limitadjust circuitry in accordance with the teachings of the presentinvention.

FIG. 6 is a timing diagram illustrating waveforms of one embodiment ofswitching regulator operating in various states of a state machine withvarying current limit levels in accordance with the teachings of thepresent invention.

FIG. 7 is a timing diagram illustrating waveforms of another embodimentof switching regulator operating in various states of a state machinewith varying current limit levels in accordance with the teachings ofthe present invention.

FIG. 8 is a timing diagram illustrating waveforms of yet anotherembodiment of switching regulator operating in various states of a statemachine with varying current limit levels in accordance with theteachings of the present invention.

FIG. 9 is a timing diagram illustrating waveforms of still anotherembodiment of switching regulator operating in various states of a statemachine with varying current limit levels in accordance with theteachings of the present invention.

DETAILED DESCRIPTION

Method and an apparatus for regulating a power supply are disclosed. Inthe following description, numerous specific details are set forth inorder to provide a thorough understanding of the present invention. Itwill be apparent, however, to one having ordinary skill in the art thatthe specific detail need not be employed to practice the presentinvention. In other instances, well-known materials or methods have notbeen described in detail in order to avoid obscuring the presentinvention.

In one embodiment, a switching regulator in accordance with theteachings of the present invention operates in a manner such that modesof operation in the audible frequency range are avoided. One embodimentof the switching regulator includes a state machine, with each staterepresenting a current limit level. At full load, the current limit isat the full level. As the load decreases, the frequency decreases untilit is approximately 20 kHz, the level at the upper end of the audiblefrequency range. At this point, a state transition to one with a lowercurrent limit is executed. In order to provide the same power to theoutput, the feedback loop will request more switching cycles, thusincreasing the frequency of operation. Therefore, the frequency ismaintained above the audio frequency range at this point. In oneembodiment, this process is repeated as the load is reduced until thestate with the lowest current limit has been reached. This state has acurrent limit level that is low enough such that the flux densitythrough the power supply transformer does not cause the transformer toproduce unacceptable levels of audio noise. Therefore, the flux densitythrough the transformer is limited to low values with the selected lowcurrent limit levels when the switching regulator operates within theaudible frequency range due to light loads.

In one embodiment, the switching regulator senses a feedback currentthat is determined by the status of the regulation of the output of thepower supply. The more the output is below its desired level, the lowerthe magnitude of this current becomes. As will be shown, if themagnitude of this current is below a set threshold, a digital signalinside the regulator circuit, referred to herein as an Enable signal,will become logic level one and the switching regulator circuit willswitch. If the magnitude of this current is above a set threshold, theEnable signal will become logic level zero and the switching regulatorcircuit will skip a cycle.

As will be discussed, a state machine and a plurality of current limitsettings are utilized in accordance with the teachings of the presentinvention. In one embodiment, the state is in a low state at start-up ofthe switching regulator. The low state selects a lowest current limitsetting of one embodiment of the switching regulator. If this currentlimit in the low state is insufficient to regulate the output, which canhappen at start-up or if the load is increased, the regulator circuitwill not skip any cycles.

In one embodiment, after a pattern of N equals six consecutive Enabledigital ones for a preceding N equals six consecutive switching cyclesat the lowest state, the state machine transitions to the a mediumstate, which corresponds to a medium current limit level. If for somereason the load is reduced and the regulator circuit encounters N equalssix consecutive Enable digital zeroes, which results in N equals sixconsecutive skipped cycles, the state machine makes a transition back tothe low state. This prevents the regulator circuit from operating in theaudible range in the medium state. In one embodiment, if the currentlimit in the medium state is insufficient to regulate the output, whichcan happen at start-up or if the load is increased, the regulatorcircuit will not skip any cycles.

In one embodiment, after a pattern of N equals six consecutive Enabledigital ones for a preceding N equals six consecutive switching cyclesat the medium state, the state machine transitions to the high state,which corresponds to a high current limit level. If for some reason theload is reduced and the regulator circuit encounters N equals sixconsecutive Enable digital zeroes, which results in N equals sixconsecutive skipped cycles, the state machine makes a transition back tothe medium state. This prevents the regulator circuit from operating inthe audible range in the high state. If the current limit in the highstate is insufficient to regulate the output, which can happen atstart-up or if the load is increased, the regulator circuit will notskip any cycles.

In one embodiment, after a pattern of N equals six consecutive Enabledigital ones for a preceding N equals six consecutive switching cyclesat the high state, the state machine transitions to a state with a highcurrent limit level, referred to herein as a super high state, but onewithout any skipping of cycles. In this super-high state, an Enabledigital one results in a switching cycle at the high current limitlevel, while an Enable digital zero results in a switching cycle at themedium current limit level. This prevents the skipping of cycles at afrequency in the audio frequency range. If for some reason the load isreduced and the regulator circuit encounters N equals six consecutiveEnable digital zeroes, the state machine makes a transition back to thehigh state with the skipping of cycles.

In one embodiment, the various plurality of current limit levels and thepoint of transition from one level to the next are carefully optimized.In one embodiment, the state machine in accordance with the teachings ofthe present invention is designed such that oscillations between statesdo not occur. If these oscillations occur at a sufficiently highfrequency, the audio noise problem can reappear. These problems canoccur if a load exists such that it cannot be handled by any combinationof switching and skipping in any state. For example, the energygenerated by one switching cycle followed by 5 skipped cycles at thehigh current limit level can be too much for a certain load. If, at thesame time, the energy generated by one skipped cycle followed by 5switching cycles at the medium current limit level is too little toregulate this same load, then the state machine will oscillate betweenthe two states, possibly causing audio noise. Thus the energy levels ofthe different states overlap in one embodiment. The current limit levelsof the various states are not separated by a substantially large degree.In addition, the number of N cycles of delay required for changingstates is not too small. For instance, N is equal to 6 in oneembodiment. It is appreciated however that in other embodiments, N maybe greater than or less than 6.

In one embodiment, stability of the state machine is improved to agreater degree while at the same time maintaining the transient responseat start-up to a heavy load. Increased stability is realized in thisembodiment with the inclusion of yet another current limit level stateby incorporating hysteretic behavior in the medium state. The mediumcurrent limit level is split into two distinct levels, a lower mediumlevel and an upper medium level.

In one embodiment, after power-up when the regulator circuit firstenters the medium state, the current limit will be set to the lowermedium level. If the regulator circuit transitions to the high state andthen back to the medium state, the current limit will be set to theupper medium level. If the state machine receives the pattern of Nconsecutive Enable digital zeroes that cause the transition from theupper medium state to the low state and if it then receives theconsecutive Enable digital ones to transition back to the medium state,then the current limit will be set to the lower medium level. The uppermedium and lower medium states in accordance with the teachings of thepresent invention are two different states with different current limitlevels. The benefit of this embodiment is mainly in transient responseas it would take less cycles to move from one end of the states to theother end.

To illustrate, FIG. 1 is a schematic illustrating one embodiment of apower supply 100 including a switching regulator 139 in accordance withthe teachings of the present invention. As shown, an alternating current(AC) mains voltage is input through resistor 101 into bridge rectifier147, including diodes 103, 105, 107 and 109, which provides a rectifiedsignal to power supply capacitors 113 that provide input DC voltage toprimary winding 149 of energy transfer element or transformer 125. It isappreciated that supply rails are provided at the ends of bridgerectifier 147. Switching regulator circuit 139 allows current to flowthrough primary winding 149 during its on state of each switching cycleand acts as open circuit when in its off state. When current flowsthrough primary winding 149, transformer 125 is storing energy. When nocurrent is flowing through primary winding 149, any energy stored intransformer 125 is delivered from secondary winding 141 to capacitor131. Capacitor 131 delivers power to the load 143. The voltage acrossthe load 143 will vary depending on the amount of energy stored in thetransformer 125 in each switching cycle which is in turn dependent onthe length of time current is flowing through primary winding 149 ineach switching cycle.

In one embodiment, the sum of the voltage drop across optocoupler 127and the reverse break down voltage of zener diode 133 is approximatelyequal to the desired output threshold level across load 143. When thevoltage across the. load 143 reaches the threshold level, current beginsto flow through optocoupler 127 and zener diode 133 that in turn is usedto disable the switching regulator circuit 139. In one embodiment,whenever switching regulator circuit 139 is in the off-state theregulator circuit power supply bypass capacitor 123 is charged to theoperating supply voltage, which in one embodiment is typically 5.7 voltsby allowing a small current to flow from bypass terminal 145 to theswitching regulator circuit power supply bypass capacitor 123. Regulatorcircuit power supply bypass capacitor 123 is used to supply power tooperate switching regulator circuit 139 when it is in the on-state.

In one embodiment, switching regulator circuit 139 operates in thefollowing fashion under most loads except with very heavy loads which isdescribed later. When the switching regulator circuit 139 is disabled,an open circuit condition is created in primary winding 149 andtransformer 125 does not store energy. The energy stored in thetransformer 125 from the last cycle of switching regulator circuit 139is then delivered to secondary winding 141, which in turn supplies powerto load 143 at the output of the power supply 100. Once the remainingenergy in transformer 125 is delivered to the load 143 the voltage ofthe load 143 will decrease.

When the voltage at the load 143 decreases below the threshold level,current ceases to flow through optocoupler 127 and switching regulatorcircuit 139 resumes operation either instantaneously or nearlyinstantaneously. Under very heavy loads, the switching regulator circuit139 in one embodiment operates in a slightly altered fashion. Thecurrent limit level chosen by a state machine included in one embodimentof switching regulator circuit 139 is the highest level under very heavyload. However, the switching regulator circuit 139 will not entirelycease to operate when the voltage at the load is above the thresholdlevel. Instead it will operate at a lower current limit level.

As mentioned, one embodiment of switching regulator circuit 139 includesa state machine that, depending on the load 143, chooses the appropriatecurrent limit level among a discrete and finite number of a plurality ofcurrent limit levels. The selected current limit level turns off theswitching regulator circuit 139 when the current flowing through theprimary winding 149 or switching regulator circuit 139 rises above theselected current threshold level.

FIG. 2 is a schematic illustrating one embodiment of a switchingregulator 139 in accordance with the teachings of the present invention.As shown, switching regulator circuit 139 includes a power switch ormetal oxide semiconductor field effect transistor (MOSFET) 229 that iscoupled between a drain terminal 231 and a source terminal 233. MOSFET229 is switched on and off according to a drive signal 249 generated bya drive signal generator. In one embodiment, drive signal 249 is inputinto the gate of MOSFET 229 by AND gate 225. In one embodiment, drivesignal generator includes AND gates 215 and 225, OR gate 217, latch 219,oscillator 207, state machine circuitry 301, current limit adjustcircuitry 305 and their associated elements. The input of AND gate 225includes an output of a latch 219, a bypass terminal voltage indicator257 provided by undervoltage comparator 213, and a thermal status signal241 from thermal shut-down circuit 209. In one embodiment, Maximum dutycycle signal 237 generated by oscillator 207 determines the maximum timethat MOSFET 229 can conduct in each cycle of operation.

When the phototransistor 127 current being pulled out of the feedbackinput 203 is greater than the current source 205, Enable signal 235 willbe pulled to a low state. When the phototransistor 127 current beingpulled out of the feedback input 203 is less than the current source205, Enable signal 235 will be pulled to a high state. As shown, Enablesignal 235 is also coupled to be received by the state machine circuitry301. State machine circuitry 301 will send signals 303 to the currentlimit (Ilim) Adjust circuitry 305, setting the current limit ofl_(drain) 255 through MOSFET 229 or primary winding 149 to be lower inlight load or higher in high load. In one embodiment, there are threesignals 303 a, 303 b and 303 c included in signals 303.

In one embodiment, current limit adjust circuitry 305 adjusts thecurrent limit in digital steps. Transitions to a higher current limitstate occur after a pattern of N consecutive Enable signal 235 logichighs. Transitions to a lower current limit state occur after a patternof N consecutive Enable signal 235 logic lows. In one embodiment, Nequals 6. At a sufficiently high current limit state, super high signal309 output of state machine circuitry 301 will be set to be logic highstate. As a result, OR gate 313 will set signal 315 to be high wheneither the state machine circuitry 301 is in the super high state orwhen Enable signal 235 is high. Signal 315 ultimately determines whethera switching cycle will occur. Thus, when the state machine circuitry 301is not in the super-high state, the Enable signal 235 determines whetheror not a switching cycle will occur. However, when the state machinecircuitry 301 is in the super-high state and super high signal 309 is ina logic high state, all switching cycles will occur at either one of twodesignated current limit levels.

In one embodiment, the inputs to latch 219 include an OR gate outputsignal 245 and an AND gate output signal 243. The AND gate output signal243 is high only when signal 315 and clock signal 239 generated byoscillator 207 are both high. Thus, AND gate 215 provides output whenlogical high signal 315 is received and clock signal 239 is provided byoscillator 207. In operation, when signal 315 is high, the clock signal239 is transferred to latch 219 by the AND gate 215, thereby setting thelatch 219 and enabling that cycle to go through and turn on the MOSFET229. Conversely, when the signal 315 is low, it blocks the clock signalfrom setting the latch 219, and keeps the MOSFET 229 off during thatcycle.

In one embodiment, OR gate output signal 245 is provided by OR gate 217when the current threshold limit is reached or during the time whenmaximum duty cycle signal 237 is in an off state. In operation, OR gateoutput signal 245 is high when either the maximum duty cycle signal 237is low or when the current limit is reached after the leading edgeblanking delay, which is determined by leading edge blanking circuit223, in order to turn off the MOSFET 229.

In one embodiment, signal 317 generated by current limit adjustcircuitry 305 is a voltage level proportional to the voltage across theMOSFET, 229 on-resistance. Current limit states are determined bysignals 303 a, 303 b and 303 c, which are generated by state machinecircuitry 301. At higher current limit states, current limit adjustcircuitry 305 changes signal 317 to become a lower proportion of theMOSFET 229 on-resistance voltage. At lower current limit states, block305 causes signal 317 to become a higher proportion of the MOSFET 229on-resistance voltage. Current threshold comparator 227 then comparessignal 317 to a set voltage, current threshold limit voltage V_(ILIMIT)251. If signal 317 is above the current threshold limit voltageV_(ILIMIT) 251 the current limit signal is triggered and the MOSFET 229is turned off and then will not begin conducting until the beginning ofthe next on-time.

In one embodiment, the switching regulator circuit 139 turns off theMOSFET 229 after the current on cycle when the signal 315 is pulled lowand creates a condition where there will be no additional power suppliedto the load. Accordingly, signal 315 in response to the output of powersupply 100 selectively allows the on time of a current cycle of drivesignal 249 to be maintained and not allow or disable an on time of anext cycle of drive signal 249. When signal 315 is pulled high, theMOSFET 229 will resume operation upon the beginning of the nexton-period of the maximum duty cycle signal 237.

In one embodiment, a bypass circuit or 5.7V regulator 211, whichincludes the current source from the drain terminal 231 to the bypassterminal 145, regulates the power level of regulator circuit powersupply bypass capacitor 123 at a voltage level, which in one embodimentis 5.7 volts. This is done by charging the switching regulator circuit139 power supply bypass capacitor 123 when the MOSFET 229 is notconducting. In one embodiment, undervoltage comparator 213 prevents theMOSFET 229 from conducting again until the voltage at bypass terminal145 reaches the desired voltage level. Inverter 307 is used to invertthe output of an undervoltage comparator 213.

FIG. 3 is a state machine diagram 351 illustrating one embodiment of theprocessing flow between states of state machine circuitry 301 inaccordance with the teachings of the present invention. As shown, oneembodiment of state machine diagram includes five states: low state 353,lower medium state 355, upper medium state 357, high state 359 and superhigh state 361. In one embodiment, each state selects from a pluralityof current limit settings for current limit adjust circuitry 305. Table1 below summarizes the current limit settings or cycle skipping settingsselected by the states according to one embodiment of the presentinvention.

TABLE 1 State Machine Current Limit Settings STATE ENABLE = 0 ENABLE = 1low skip 0.4 Ilim-max lower medium skip 0.5 Ilim-max upper medium skip0.7 Ilim-max high skip Ilim-max super high 0.5 Ilim-max Ilim-max

As shown in the embodiment summarized in Table 1, when in low state 353,a cycle of drive signal 249 is skipped when Enable signal 235 is low andthe current limit setting is 0.4 Ilim-max when Enable signal 235 ishigh. When in lower medium state 355, a cycle of drive signal 249 isskipped when Enable signal 235 is low and the current limit setting is0.5 Ilim-max when Enable signal 235 is high. When in upper medium state357, a cycle of drive signal 249 is skipped when Enable signal 235 islow and the current limit setting is 0.7 Ilim-max when Enable signal 235is high. When in high state 359, a cycle of drive signal 249 is skippedwhen Enable signal 235 is low and the current limit setting is Ilim-maxwhen Enable signal 235 is high. When in super high state 361, thecurrent limit setting is 0.5 Ilim-max when Enable signal 235 is low andthe current limit setting is Ilim-max when Enable signal 235 is high.Note that in one embodiment, no cycles are skipped in drive signal 249when in super high state 361. It is also noted that in one embodiment,the lower current limit settings, e.g. 0.4Ilim-max, result in low fluxdensity through the transformer 125 when switching regulator circuit 139operates at lower frequencies within the audible frequency range (e.g.20 Hz to 20 kHz). As a result, unacceptable audio noise is not generatedby power supply 100 in accordance with the teachings of the presentinvention. Stated differently, a switching regulator circuit 139 inaccordance with the teachings of the present invention will not operatewithin the audible frequency range unless the flux density is limited tobe below a sufficiently low threshold value to reduce the generation ofundesired audible noise.

As shown in FIG. 3, at power-up the state machine circuitry 301 startsat low state 353. The state machine circuitry 301 will stay in the lowstate 353 until a pattern of N equals 6 consecutive high Enable signals235 occur. In one embodiment, this will be the case when the output load143 is light. The state machine circuitry 301 will move up to lowermedium state 355 upon the occurrence of a pattern of N equals 6consecutive high Enable signals 235. This is illustrated in FIG. 3 withtransition 363. The state machine circuitry 301 will stay in this stateunder a medium load 143. If the load 143 is further increased, a patternof N equals 6 consecutive high Enable signals 235 will occur again andthe state machine circuitry 301 will move up to high state 359, andsimilarly to super high state 361. This is illustrated in FIG. 3 withtransitions 367 and 375, respectively. If the load 143 is decreased, thestate machine circuitry 301 will move down upon the occurrence of apattern of 6 consecutive low Enable signals 235 until the appropriatestate is established. For instance, transition 377 illustrates statemachine circuitry 301 changing from super high state 361 to high state359, transition 369 illustrates state machine circuitry 301 changingfrom high state 359 to upper medium state 357 and transition 373illustrates state machine circuitry 301 changing from upper medium state357 to low state 353.

As mentioned earlier, improved transient response is provided for statemachine circuitry 301 by incorporating hysteretic behavior in the mediumstate. Indeed, the medium state is separated into lower medium state 355and upper medium state 357. Accordingly, hysteretic behavior in theselection of current limit levels is provided using lower medium state355 and upper medium state 357 in accordance with the teachings of thepresent invention.

In one embodiment, the current limit levels are chosen such that thepower level delivered in different states are overlapping. For example,maximum power level delivered in upper medium state 357 when a patternof 5 consecutive high Enable signals 235 are followed by one low Enablesignal 235 is higher than the minimum power delivered in the high state359 when a pattern of 5 consecutive low Enable signals 235 are followedby one high Enable signal 235. Therefore, the maximum power delivered tothe output of the power supply for the upper medium state 357 currentlimit settings when the power supply 100 operates at a maximum on/offcycle ratio is greater than a minimum power delivered to the output ofthe power supply the high state 359 current limit settings when thepower supply operates at a minimum on/off cycle ratio.

FIG. 4 is a schematic illustrating one embodiment of state machinecircuitry 301 of switching regulator circuit 139 in accordance with theteachings of the present invention. As illustrated, in one embodiment,the inputs to state machine circuitry 301 are the Enable signal 235, theundervoltage (UV) signal 319 and the maximum duty cycle (Dmax) signal237. The outputs of state machine circuitry 301 are a one bit super highsignal 309 and a three bit signal 303 a/b/c including the high-Ilimsignal 303 a, the upper medium signal 303 b, and the medium signal 303c.

In operation, during power up, all the latches 457, 459, 473, and 463are reset to 0 through the UV signal 319. This places the state machineat low state 353.

During power-up, a counter 402 is also reset to the count 0 (000 inbinary) because UV signal 319 is high, causing or-gate 433 to keepsignal 424 high. In one embodiment, counter 402 is a 3 bit counter. Inone embodiment, on each falling edge of Dmax 237 signal, the counter 402counts to the next number. In one embodiment, count 6 signal 479 is thedecoded output signal for this counter 402. The count 6 signal 479becomes logic high when the counter 402 counts to 6 (110 in binary). Oneway the counter can be reset to the count 0 (000 in binary) is by anychange in the Enable signal 235. If the Enable signal 235 changes fromlow to high, signal 411 from transition detector 498 will becomemomentarily high. If the Enable signal 235 changes from high to low,signal 411 will also become momentarily high. If signal 411 becomeshigh, signal 424 from OR gate 433 becomes high and resets the counterback to the count 0 (000 in binary). Thus, the counter 402 will onlykeep counting if there is a pattern of consecutive high or low Enablesignals 235.

After start-up, when the counter 402 counts to N equals 6 (110 inbinary), signal 479 becomes high, and if Enable signal 235 has been highduring all this time, AND gate 469 will change the move-up signal 408 tologic 1. When the move-up signal 408 becomes logic 1, latch 457 will setmedium signal 303 c to logic 1. At this point the state machine is inthe lower medium state 355. As soon as the transition of medium signal303 c from logic 0 to 1 is detected, signal 423 will become momentarilylogic 1, causing signal 431 and consequently signal 424 to become logic1 and resetting the counter to the count 0 (000 in binary).

When the counter counts to 6 again (110 in binary), signal 479 becomeshigh again, and if Enable signal 235 has been high during all this time,gate 469 will change the move-up signal 408 to logic 1. When the move-upsignal 408 becomes logic 1 and since medium signal 303 c is alreadylogic 1, latch 459 will set the high signal 418 to logic 1. At thispoint, the state machine 351 is in the high state 359. The high currentlimit signal 303 a is only logic 1 when both the high signal 418 and theEnable signal 235 are high. As soon as the transition of high statesignal 418 from logic 0 to 1 is detected, signal 420 will becomemomentarily logic 1, causing signal 431 and consequently signal 424 tobecome logic 1 and resetting the counter to the count 0 (000 in binary).

When the counter counts to 6 again (110 in binary), signal 479 becomeshigh again, and if Enable signal 235 has been high during all this time,gate 469 will change the move-up signal 408 to logic 1. When the move-upsignal 408 becomes logic 1, and since high signal 418 is already logic1, latch 473 will set super high signal 309 to logic 1. At this pointthe state machine circuitry 301 is in super-high state 361.

In one embodiment, to go down from super-high state 361, the Enablesignal 235 has to stay low. When the counter counts to 6 (110 inbinary), signal 479 becomes high, and if Enable signal 235 has been lowduring all this time, gate 471 will change the move-down signal 407 tologic 1. When the move-down signal 407 becomes logic 1, latch 473 willreset super high signal 309 to logic 0. At this point the state machinecircuitry 301 is back in high state 359. As soon as the transition ofsuper high signal 309 from logic 1 to 0 is detected, signal 415 willbecome momentarily logic 1, causing signal 431 and consequently signal424 to become logic 1 and resetting the counter to the count 0 (000 inbinary).

When the counter counts to 6 again (110 in binary), signal 479 becomeshigh again, and if Enable signal 235 has been low during all this time,gate 471 will change the move-down signal 407 to logic 1. When themove-down signal 407 becomes logic 1, and if nsuper-high signal 416 islogic 1, latch 459 will reset high signal 418 to logic 0. At this pointthe state machine circuitry 301 is back in upper medium state 357. Assoon as the transition of high state signal 418 from logic 1 to 0 isdetected, signal 421 will become momentarily logic 1, causing signal 431and consequently signal 424 to become logic 1 and resetting the counterto the count 0 (000 in binary).

When the counter counts to 6 again (110 in binary), signal 479 becomeshigh again, and if Enable signal 235 has been low during all this time,gate 471 will change the move-down signal 407 to logic 1. When themove-down signal 407 becomes logic 1, and if nhigh signal 425 is logic1, latch 457 will reset medium signal 303 c to logic 0. At this pointthe state machine circuitry 301 is back to low state 353.

The medium state is additionally controlled by latch 463. The output oflatch 463 decides whether or not the state machine circuitry 301 is inupper-medium 357 or lower-medium state 355. During power-up, latch 463is reset. Transition from high state 359 to upper medium state 357 setsthe output of latch 463 to logic 1, and transition from upper mediumstate 357 to low state 353 resets the output of latch 463 to logic 0.Latch 463 operation is as follows. Signal 421 will become logic 1 on thehigh signal 418 transition from 1 to 0. This will set latch 463, makingthe upper-medium signal 303 b logic 1. On the other hand, signal 428will become logic 1 on the medium signal 303 c transition from 1 to 0.This will reset latch 463, making the upper-medium signal 303 b logic 0.

FIG. 5 is a schematic illustrating one embodiment of current limitadjust circuitry 305 of switching regulator circuit 139 in accordancewith the teachings of the present invention. As shown, a voltage dividercircuit is formed with resistor 480 transistor 485 and resistors 481,482, 483 and 484 coupled in series between drain terminal 231 andground. The inputs to current limit adjust circuit 305 are the drainsignal 231, gate signal 249, and signal 303 a/b/c. The output of currentlimit adjust circuitry 305 is signal 317. As shown in FIG. 5, whenmedium signal 303 c is logic 1, resistor 484 is shorted in the currentlimit adjust circuitry 305. When upper-medium signal 303 b is logic 1,resistors 484 and 483 are shorted in the current limit adjust circuitry305. When high-Ilim signal 303 a is logic 1, resistors 484, 483 and 482are shorted in the current limit adjust circuitry 305. The moreresistors are shorted, the lower the voltage at signal 317 becomesrelative to the drain voltage at drain terminal 231, thus adjusting orselecting the current limit setting.

FIGS. 6-9 are timing diagrams illustrating waveforms of variousembodiment of switching regulator circuit 139 operating in variousstates of a state machine circuitry 301 with varying current limitlevels in accordance with the teachings of the present invention. Asshown in FIG. 6, at time T0, the state machine circuitry 301 is in thelow state 353. Accordingly the current limit for the drain currentIDRAIN 255 is 0.4Ilim-max with Enable signal 235 equal to 1. After apattern of N equals 6 Enable signals 235 equal to 1 for the preceding Nequals 6 drive signal cycles, state machine circuitry 301 transitions tolower medium state 355 at time T1. Accordingly the current limit for thedrain current IDRAIN 255 is 0.5Ilim-max with Enable signal 235 equalto 1. After a pattern of another N equals 6 Enable signals 235 equal to1 for the preceding N equals 6 drive signal cycles, state machinecircuitry 301 transitions to high state 359 at time T2. Accordingly thecurrent limit for the drain current IDRAIN 255 is Ilim-max with Enablesignal 235 equal to 1. After a pattern of another N equals 6 Enablesignals 235 equal to 1 for the preceding N equals 6 drive signal cycles,state machine circuitry 301 transitions to super high state 361 at timeT3. Accordingly the current limit for the drain current IDRAIN 255 isIlim-max with Enable signal 235 equal to 1 and 0.5 Ilim-max with Enablesignal 235 equal to 0.

As shown in FIG. 7, at time T4, the state machine circuitry 301 is inthe super high state 361. Accordingly, the current limit for the draincurrent IDRAIN 255 is 0.5Ilim-max with Enable signal 235 equal to 0.After a pattern of N equals 6 Enable signals 235 equal to 0 for thepreceding N equals 6 drive signal cycles, state machine circuitry 301transitions to high state 359 at time T5. Accordingly, the cycles indrive signal 249 are skipped with Enable signal 235 equal to 0. After apattern of another N equals 6 Enable signals 235 equal to 0 for thepreceding N equals 6 drive signal cycles, state machine circuitry 301transitions to upper medium state 357 at time T6. Accordingly, thecycles in drive signal 249 are skipped with Enable signal 235 equal to0. After a pattern of another N equals 6 Enable signals 235 equal to 0for the preceding N equals 6 drive signal cycles, state machinecircuitry 301 transitions to low state 353 at time T7. Accordingly, thecycles in drive signal 249 are skipped with Enable signal 235 equal to0.

As shown in FIG. 8, at time T8, the state machine circuitry 301 is inthe low state 353. Accordingly, the current limit for the drain currentIDRAIN 255 is 0.4Ilim-max with Enable signal 235 equal to 1. After apattern of N equals 6 Enable signals 235 equal to 1 for the preceding Nequals 6 drive signal cycles, state machine circuitry 301 transitions tolower medium state 355 at time T9. Accordingly, the current limit forthe drain current IDRAIN 255 is 0.5Ilim-max with Enable signal 235 equalto 1. After a pattern of another N equals 6 Enable signals 235 equal to1 for the preceding N equals 6 drive signal cycles, state machinecircuitry 301 transitions to high state 359 at time T10. Accordingly,the current limit for the drain current IDRAIN 255 is Ilim-max withEnable signal 235 equal to 1 and cycles in drive signal 249 are skippedwith Enable signal 235 equal to 0. After a pattern of N equals 6 Enablesignals 235 equal to 0 for the preceding N equals 6 drive signal cycles,state machine circuitry 301 transitions to upper medium state 357 attime T11. Accordingly, the current limit for the drain current IDRAIN255 is 0.7Ilim-max with Enable signal 235 equal to 1.

It is appreciated that because of the hysteretic nature of the upper andlower medium states 359 and 357, state machine 351 moves up first tohigh state 359 before moving back down to upper medium state 357. Stateddifferently, state machine 351 transitions from lower medium state 355directly to high state 359 without transitioning through upper mediumstate 357. Therefore, the current limit of upper medium state 357 is notselected when transitioning from lower medium state 355 to high state359.

As shown in FIG. 9, at time T12, the state machine circuitry 301 is inthe high state 359. Accordingly, the cycles in drive signal 249 areskipped with Enable signal 235 equal to 0. After a pattern of N equals 6Enable signals 235 equal to 0 for the preceding N equals 6 drive signalcycles, state machine circuitry 301 transitions to upper medium state357 at time T13. Accordingly, the current limit for the drain currentIDRAIN 255 is 0.7Ilim-max with Enable signal 235 equal to 1 and thecycles in drive signal 249 are skipped with Enable signal 235 equal to0. After a pattern of another N equals 6 Enable signals 235 equal to 0for the preceding N equals 6 drive signal cycles, state machinecircuitry 301 transitions to low state 353 at time T14. Accordingly, thecurrent limit for the drain current IDRAIN 255 is 0.4Ilim-max withEnable signal 235 equal to 1. After a pattern of N equals 6 Enablesignals 235 equal to 1 for the preceding N equals 6 drive signal cycles,state machine circuitry 301 transitions to lower medium state 355 attime T15. Accordingly, the current limit for the drain current IDRAIN255 is 0.5Ilim-max with Enable signal 235 equal to 1.

It is appreciated that because of the hysteretic nature of the upper andlower medium states 357 and 355, state machine circuitry 301 moves downfirst to low state 353 before moving back up to lower medium state 355.Stated differently, state machine circuitry 301 transitions from uppermedium state 357 directly to low state 353 without transitioning throughlower medium state 355. Therefore, the current limit of lower mediumstate 355 is not selected when transitioning from upper medium state 357to low state 353.

In the foregoing detailed description, the method and apparatus of thepresent invention has been described with reference to specificexemplary embodiments thereof. It will, however, be evident that variousmodifications and changes may be made thereto without departing from thebroader spirit and scope of the present invention. The presentspecification and figures are accordingly to be regarded as illustrativerather than restrictive.

What is claimed is:
 1. A switching regulator, comprising: a power switchcoupled between first and second terminals, the first terminal to becoupled to an energy transfer element of a power supply and the secondterminal to be coupled to a supply rail of the power supply; a drivesignal generator circuit coupled to a third terminal to receive an inputsignal, the drive signal generator to generate a drive signal coupled tocontrol switching of the power switch responsive to the input signal,the drive signal generator circuit to selectively disable each on periodof the drive signal in response to the input signal to regulate theoutput of the power supply; and a current limit circuit coupled to thepower switch and the drive signal generator circuit to control the drivesignal to limit a current flow through the power switch, the currentlimit circuit having a plurality of current limit settings for the powerswitch selected responsive to the input signal.
 2. The switchingregulator of claim 1 wherein the input signal is a feedback signalrepresentative of an output of the power supply.
 3. The switchingregulator of claim 1 wherein the input signal is a feedback signalrepresentative of an output voltage of the power supply.
 4. Theswitching regulator of claim 1 wherein the input signal is a feedbacksignal representative of an output current of the power supply.
 5. Apower supply, comprising: an energy transfer element having an energytransfer element input and an energy transfer element output coupled toan output of the power supply; a power switch coupled between the energytransfer element input and a supply rail of the power supply; a drivesignal generator circuit coupled to receive an input signal, the drivesignal generator to generate a drive signal coupled to control switchingof the power switch responsive to the input signal, the drive signalgenerator circuit to selectively disable each on period of the drivesignal in response to the input signal to regulate the output of thepower supply; and a current limit circuit coupled to the power switchand the drive signal generator circuit to control the drive signal tolimit a current flow through the power switch, the current limit circuithaving a plurality of current limit settings for the power switchselected responsive to the input signal.
 6. The power supply of claim 5wherein the input signal is a feedback signal representative of anoutput of the power supply.
 7. The power supply of claim 5 wherein theinput signal is a feedback signal representative of an output voltage ofthe power supply.
 8. The power supply of claim 5 wherein the inputsignal is a feedback signal representative of an output current of thepower supply.